import { Rule } from "./types";

export const Flake8ReturnRuleList: Rule[] = [
    {
        code: "RET501",
        name: "unnecessary-return-none",
        descEn: "Do not explicitly return None in function if it is the only possible return value",
        descCn: "",
        autoFix: true,
    },
    {
        code: "RET502",
        name: "implicit-return-value",
        descEn: "Do not implicitly return None in function able to return non-None value",
        descCn: "",
        autoFix: true,
    },
    {
        code: "RET503",
        name: "implicit-return",
        descEn: "Missing explicit return at the end of function able to return non-None value",
        descCn: "",
        autoFix: true,
    },
    {
        code: "RET504",
        name: "unnecessary-assign",
        descEn: "Unnecessary variable assignment before return statement",
        descCn: "",
        autoFix: false,
    },
    {
        code: "RET505",
        name: "superfluous-else-return",
        descEn: "Unnecessary {branch} after return statement",
        descCn: "",
        autoFix: false,
    },
    {
        code: "RET506",
        name: "superfluous-else-raise",
        descEn: "Unnecessary {branch} after raise statement",
        descCn: "",
        autoFix: false,
    },
    {
        code: "RET507",
        name: "superfluous-else-continue",
        descEn: "Unnecessary {branch} after continue statement",
        descCn: "",
        autoFix: false,
    },
    {
        code: "RET508",
        name: "superfluous-else-break",
        descEn: "Unnecessary {branch} after break statement",
        descCn: "",
        autoFix: false,
    },
];